import React from 'react'
import {useNavigate,Outlet} from 'react-router-dom'
export default function Home() {
  const navigate = useNavigate()
  const jumpNewshandle = ()=>{
    navigate('/main/home/news/001',{
      state:[
       'oasidoiasdo','iasdfoaseifsd','asdojavv','ew8rihwiverv'
      ]
    })
  }
  const jumpMusichandle = ()=>{
    navigate('/main/home/music/001/?name=赵露思',{
      state:[
        {id:'001',name:'赵露思',song:'你好像掉进了爱情海里'},
        {id:'002',name:'周杰伦',song:'晴天'},
        {id:'003',name:'邓紫棋',song:'喜欢你'},
        {id:'004',name:'周深',song:'大鱼海棠'},
        {id:'005',name:'郁可唯',song:'时间煮雨'},
      ]
    })
  }
  return (
    <div>
         <h3>我是Home的内容</h3>
         <button onClick={jumpNewshandle}>News</button>
         <button onClick={jumpMusichandle}>Music</button>
         <Outlet />
    </div>
  )
}
